home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hot Shareware 37
/
hot37.iso
/
FICHEROS
/
WEDU
/
MICSCOP3.ZIP
/
TESTDIAL.DIR
/
00028_Script_Main Scripts
< prev
next >
Wrap
Text File
|
1998-02-07
|
2KB
|
73 lines
global teacher,coursecode, studentName, ACommand
global Attempts -- a list of 8, each a list of 4
-- 8 lessons and 4 tests
global TestNumber, LessonNumber
on InitTakeTest
InitStudentInfo
-- put the cursors on the buttons.
repeat with i = 10 to 12
set the cursor of sprite i to [the number of member "PH", the number of member "PH_Mask"]
end repeat
end
on InitStudentInfo
if voidP (teacher) then
set teacher to the text of member "teacher Text"
end if
if voidP (coursecode) then
set coursecode to the text of member "coursecode Text"
end if
if voidP (studentName) then
set studentName to the text of member "studentName Text"
end if
set the text of member "teacher Text" to line 1 of teacher
set the text of member "coursecode Text" to line 1 of coursecode
set the text of member "studentName Text" to line 1 of studentName
end InitStudentInfo
on UpDateStudentInfo
set teacher to line 1 of the text of member "teacher Text"
set coursecode to line 1 of the text of member "coursecode Text"
set studentName to line 1 of the text of member "studentName Text"
end
on PressButton aSprite, aCast
puppetsprite aSprite, True
set aCastDown to aCast & " Down"
set the member of sprite aSprite to member aCastDown
updatestage
repeat while the mouseDown
nothing
end repeat
set the member of sprite aSprite to member aCast
updatestage
puppetsprite aSprite, False
end PressButton
on TestNotTaken
tell the stage to CancelTest
-- ACommand will remove the attemp that has been added
end
on TakeTest
-- Update the global variables
UpdateStudentInfo
tell the stage
CloseTestDialogWindow
end tell
end
on UpdateAttempts
set atestList to getat (Attempts, LessonNumber)
set aNumber to getat (aTestList,TestNumber)
set aNumber to aNumber + 1
deleteAt aTestList, TestNumber
addat aTestList, TestNumber, aNumber
end UpdateAttempts